import { createRouter, createWebHistory } from 'vue-router'
import routes from './routes'

const router = createRouter({
    history: createWebHistory(),
    routes,
    // 切换到新路由时页面滚动到顶部
    scrollBehavior() {
        return { top: 0 }
    }
})

// 导出路由
export default router